package mao.thinkinjava.concurency.uncatchexception;

import java.util.concurrent.ThreadFactory;

/**
 * @author Totoro
 * @date 2020/5/9 9:22
 */
public class MyThreadFactory implements ThreadFactory {
    private MyUncatchExceptionHandler handler=new MyUncatchExceptionHandler();
    @Override
    public Thread newThread(Runnable r) {
        Thread thread = new Thread(r);
        //thread.setUncaughtExceptionHandler(handler);
        return thread;
    }
}
